<!--  -->
<template>
  <div class="container">
    <navbar
      class="de-navbar"
      :vaniconL="true"
      :noRight="true"
      :noLeft="false"
      :vaniconR="true"
      iconNameL="arrow-left"
      iconNameR="setting-o"
      @clickLeft="goBack"
      bgcolor="rgb(55, 81, 255) !important"
      bgImage="linear-gradient(rgb(55, 81, 255) 0%, rgb(76, 99, 255) 50%, rgb(91 112 255) 75%, rgb(107 127 255) 100%) !important"
      >用户概况</navbar
    >
    <div style="height: 0.45rem"></div>
    <div class="p-content">
      <p class="b-title">用户基本信息</p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>用户姓名：<span>{{
          pData.patientName
        }}</span>
      </p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>用户年龄：<span>{{
          pData.patientAge
        }}</span>
      </p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>用户性别：<span>{{
          pData.patientGender == 0 ? "男" : "女"
        }}</span>
      </p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>用户手机：<span>{{
          pData.phone
        }}</span>
      </p>
      <p class="b-title">用户病情相关</p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>是否存在过敏史：<span>{{
          pData.allergicHistory && pData.allergicHistory == 1 ? "否" : "是"
        }}</span>
      </p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span
        >是否有重大病史或慢性病史：<span>{{
          pData.diseaseHistory && pData.diseaseHistory == 1 ? "否" : "是"
        }}</span>
      </p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>用户病情描述：<span>{{
          pData.advise
        }}</span>
      </p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>希望获得的帮助：<span>{{
          pData.adviseHelp
        }}</span>
      </p>
      <p class="b-title">上传相关</p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>上传方式：
        <span
          >{{
            pData.uploadRoute && pData.uploadRoute[0] == 1 ? "手机拍照" : ""
          }}&nbsp;</span
        >
        <span
          >{{
            pData.uploadRoute && pData.uploadRoute[1] == 1 ? "电子胶片" : ""
          }}&nbsp;</span
        >
        <span>{{ pData.uploadRoute && pData.uploadRoute[2] == 1 ? "dicom格式" : "" }}</span>
      </p>
      <p class="title">
        <span style="color: skyblue">|&nbsp;</span>订单日期：<span>{{
          pData.orderTime
        }}</span>
      </p>
    </div>
  </div>
</template>

<script>
import { Toast, Dialog } from "vant";
import navbar from "@/components/navbar";
export default {
  name: "patientProfile",
  data() {
    return {
      pData: null,
    };
  },

  components: { navbar },

  computed: {},

  created() {
    window.scroll(0, 0);
    this.pData = this.$route.params.items || null;
    console.log(this.pData);
    Toast.setDefaultOptions({ duration: 500 });
    Toast.loading({
      message: "加载中...",
      forbidClick: true,
      overlay: true,
    });
  },
  mounted() {},

  methods: {
    // 返回上一页
    goBack() {
      this.$router.replace({
        name: "checkList",
      });
    },
  },
};
</script>
<style lang='scss' scoped>
@import "../../assets/css/utils";
.container {
  position: relative;
  height: 100%;
  background: #f5f5f5;
  & .p-content {
    width: 95%;
    margin: auto;
    border-radius: 0.1rem;
    background: #fff;
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
    box-shadow: 4px 4px 10px #cccccc;
    padding: 0.01rem 0 0.2rem 0;
    & .b-title {
      font-size: 0.18rem;
      text-align: left;
      margin-left: 0.1rem;
      margin-bottom: 0.1rem;
      margin-top: 0.2rem;
      color: #4775d9;
      font-weight: 600;
    }
    & .title {
      text-align: left;
      //   text-indent: 0.1rem;
      margin-left: 0.1rem;
      font-size: 0.16rem;
      color: #6b6b6b;
      margin-bottom: 0.1rem;
      & span {
        color: black;
        line-height: 0.25rem;
      }
    }
  }
}
</style>